import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    user: {},
    jobCollection: {},
    companyCollection: {}
  },
  getters: {},
  mutations: {
    //初始化
    setInit: (state) => {
      state.user = {};
      state.jobCollection = {};
      state.companyCollection = {}
    },
    setUser: (state, {
      user
    }) => {
      state.user = user
    },
    setJobCollection: (state, {
      jobCollection
    }) => {
      state.jobCollection = jobCollection
    },
    setCompanyCollection: (state, {
      companyCollection
    }) => {
      state.companyCollection = companyCollection;
      console.log("122");
    },
  },
  actions: {},
  modules: {}
})